<!DOCTYPE html>
<html>
<body>

<div class="foo" bar="baz">
  <div class="foo" bar="baz">
    <div class="foo" bar="baz">
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
    </div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
  </div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
</div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>

<script src="../resources/runner.js"></script>
<script>
PerfTestRunner.measureRunsPerSecond({
    description: "This benchmark tests querySelectorAll() on attributes",
    run: function() {
        for (var i = 0; i < 1000; i++) {
            document.querySelectorAll("[bar^=baz]");
            document.querySelectorAll("[bar*=baz]");
        }
    }});
</script>
</body>
</html>
